<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>
    .box1 {
        width: 300px;
        height: 300px;
        background-color: skyblue;
    }
    .box2{
        width: 100px;
        height: 100px;
        background-color: purple;
    }
</style>
    <script src="../vue.js"></script>
</head>

<body>
    <!-- 插值语法 -->
    <div id="app">
        <div v-for="(item,index) in list">{{item.name}}---{{item.age}}</div>
     <input type="text" placeholder="按下回车提示输入" @keyup.enter="enterHandler">
    </div>

    
    <div id="app2">

        <h1>
            姓名:{{name}}
        </h1>

        <h1>
            年龄:{{age}}
        </h1>
        <h1>
            容貌:{{uglt}}
        </h1>
    </div>

    <script>
        Vue.config.productionTip = false; //阻止vue启动时生成的生产
        const vm = new Vue({
            el: '#app',
            //对象式写法
            data: {
            
            },
            
            //方法
            methods: {
                enterHandler(){
                    console.log("回车按下了,提交表单");
                },
            
            },
        });
      // console.log(vm);
         let arr = [1,2,3];





        var app2 = new Vue({
            el: '#app2',
            data: {
                message: '尤雨溪懂个锤子',
                name: "jack",
                age: "20",
                uglt: false,

            }
        });
    </script>
</body>

</html>